/**
 * Created by PanJiaChen on 16/11/18.
 */

/**
 * @param {string} path
 * @returns {Boolean}
 */
export function isExternal(path) {
  return /^(https?:|mailto:|tel:)/.test(path);
}

/**
 * @param {string} str
 * @returns {Boolean}
 */
export function validUsername() {
  return true;
}

/**
 * @param {string} telephone 手机号
 * @returns {Boolean}
 */
export function validPhone(telephone) {
  let RegPhone = new RegExp(
    /^1([358][0-9]|4[579]|66|7[0135678]|9[89])[0-9]{8}$/
  );
  return RegPhone.test(telephone);
}
